---
name: Active
menu: 2. Feedback Containers
---

import { Props, Prop, ChildrenProps, ChildrenProp } from '../_ui/PropsTable'
import { Active } from '../../dist/react-powerplug.esm'

# Active

The Active component is used to known when user is clicking (holding) some element.  
It's the same as `:active` pseudo selector from css.

```js
import { Active } from 'react-powerplug'
```

```jsx
<Active>
  {({ active, bind }) => (
    <div {...bind}>
      You are {active ? 'clicking' : 'not clicking'} this div.
    </div>
  )}
</Active>
```

## Props

<Props>
  <Prop name="onChange" type="function">
    The onChange event of the Active is called whenever the `active` state changes.
  </Prop>
  <Prop name="children" type="function">
    Receive state as function. It can also be `render` prop.
  </Prop>
</Props>

## Children Props

<ChildrenProps>
  <ChildrenProp name="active" type="boolean">
    True if is holding the binded element
  </ChildrenProp>
  <ChildrenProp name="bind" type="object">
    There are the bind event functions.<br />
    Contains `onMouseUp` and `onMouseDown` event listeners.
  </ChildrenProp>
</ChildrenProps>
